package com.net.wanjian.networkhospitalmanager.adapter;

import android.content.Context;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ImageView;
import android.widget.TextView;

import com.net.wanjian.networkhospitalmanager.R;
import com.net.wanjian.networkhospitalmanager.adapter.base.RecyclerBaseAdapter;
import com.net.wanjian.networkhospitalmanager.bean.SwitchRoleReturnBean;
import com.zhy.autolayout.utils.AutoUtils;

/**
 * Description:
 * Created by lidongcai on 17/5/2.
 * Email:  lidongcaiocc@163.com
 */

public class SwitchRoleAdapter extends RecyclerBaseAdapter<SwitchRoleReturnBean,SwitchRoleAdapter.Viewholder> {

    public SwitchRoleAdapter(Context context) {
        super(context);
    }

    @Override
    public Viewholder onCreateViewHolder(ViewGroup parent, int viewType) {
        View view = inflater.inflate(R.layout.item_switch_role,parent,false);
        AutoUtils.auto(view);
        return new Viewholder(view);
    }

    @Override
    public void onBindViewHolder(Viewholder holder, SwitchRoleReturnBean item, int position) {

    }

    @Override
    public int getItemCount() {
        return 5;
    }

    public static class Viewholder extends RecyclerView.ViewHolder{

        private ImageView imageView;
        private TextView textView;

        public Viewholder(View itemView) {
            super(itemView);

            imageView = (ImageView) itemView.findViewById(R.id.item_switch_role_tag);
            textView = (TextView) itemView.findViewById(R.id.item_switch_role_tv);

        }

        public void setImageView(boolean b){
            if (b){
                imageView.setVisibility(View.VISIBLE);
            }else {
                imageView.setVisibility(View.INVISIBLE);
            }
        }
    }
}
